35 research outputs found

    On the Comparison Complexity of the String Prefix-Matching Problem

    Get PDF
    In this paper we study the exact comparison complexity of the stringprefix-matching problem in the deterministic sequential comparison modelwith equality tests. We derive almost tight lower and upper bounds onthe number of symbol comparisons required in the worst case by on-lineprefix-matching algorithms for any fixed pattern and variable text. Unlikeprevious results on the comparison complexity of string-matching andprefix-matching algorithms, our bounds are almost tight for any particular pattern.We also consider the special case where the pattern and the text are thesame string. This problem, which we call the string self-prefix problem, issimilar to the pattern preprocessing step of the Knuth-Morris-Pratt string-matchingalgorithm that is used in several comparison efficient string-matchingand prefix-matching algorithms, including in our new algorithm.We obtain roughly tight lower and upper bounds on the number of symbolcomparisons required in the worst case by on-line self-prefix algorithms.Our algorithms can be implemented in linear time and space in thestandard uniform-cost random-access-machine model

    On the Comparison Complexity of the String Prefix-Matching Problem

    Full text link

    The convergence classes of Collatz function.

    Get PDF
    The Collatz conjecture, also known as the 3x + 1 conjecture, can be stated in terms of the reduced Collatz function R(x) = (3x + 1)/2^h (where 2^h is the larger power of 2 that divides 3x + 1). The conjecture is: Starting from any odd positive integer and repeating R(x) we eventually get to 1. G_k, the k-th convergence class, is the set of odd positive integers x such that Rk(x) = 1. In this paper an infinite sequence of binary strings s_h of length 2 \ub7 3^h 121 (the seeds) are defined and it is shown that the binary representation of all x 08 G_k is the concatenation of k periodic strings whose periods are s_k, . . . , s_1
    corecore